package org.zhaijisong.pojo;

import java.math.BigDecimal;
import java.sql.Timestamp;

public class Cost {
    private Integer id;
    private Integer type;
    private Integer weight;
    private BigDecimal money;
    private Integer distance;
    private Integer toll;
    private Timestamp updateDate;
    private Integer updatePeople;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getWeight() {
        return weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public Integer getDistance() {
        return distance;
    }

    public void setDistance(Integer distance) {
        this.distance = distance;
    }

    public Integer getToll() {
        return toll;
    }

    public void setToll(Integer toll) {
        this.toll = toll;
    }

    public Timestamp getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Timestamp updateDate) {
        this.updateDate = updateDate;
    }

    public Integer getUpdatePeople() {
        return updatePeople;
    }

    public void setUpdatePeople(Integer updatePeople) {
        this.updatePeople = updatePeople;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Cost cost = (Cost) o;

        if (id != null ? !id.equals(cost.id) : cost.id != null) return false;
        if (type != null ? !type.equals(cost.type) : cost.type != null) return false;
        if (weight != null ? !weight.equals(cost.weight) : cost.weight != null) return false;
        if (money != null ? !money.equals(cost.money) : cost.money != null) return false;
        if (distance != null ? !distance.equals(cost.distance) : cost.distance != null) return false;
        if (toll != null ? !toll.equals(cost.toll) : cost.toll != null) return false;
        if (updateDate != null ? !updateDate.equals(cost.updateDate) : cost.updateDate != null) return false;
        if (updatePeople != null ? !updatePeople.equals(cost.updatePeople) : cost.updatePeople != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (weight != null ? weight.hashCode() : 0);
        result = 31 * result + (money != null ? money.hashCode() : 0);
        result = 31 * result + (distance != null ? distance.hashCode() : 0);
        result = 31 * result + (toll != null ? toll.hashCode() : 0);
        result = 31 * result + (updateDate != null ? updateDate.hashCode() : 0);
        result = 31 * result + (updatePeople != null ? updatePeople.hashCode() : 0);
        return result;
    }
}
